<template>
	<div class="Bmap-wrap">
		<div class="Bmap-content" id="map">
		</div>
	</div>
</template>
<script type="text/ecmascript-6">
import BMap from 'BMap';
export default {
	props: [],
	data() {
		return {
		};
	},
	created() {
	},
	mounted() {
		var map = new BMap.Map('map');
	//	var localSearch = new BMap.LocalSearch(map);
	//	localSearch.enableAutoViewport();
		var x = this.$route.query.x;
		var y = this.$route.query.y;
		var point = new BMap.Point(y, x);
		map.centerAndZoom(point, 15);
		var marker = new BMap.Marker(point);  // 创建标注
		map.addOverlay(marker);               // 将标注添加到地图中
    }
};
</script>
<style lang="stylus" rel="stylesheet/stylus">
  @import "../../common/stylus/mixin.styl"
  @import "../../common/stylus/car.styl"
	.Bmap-wrap
		margin 0px
		padding 0px
		.Bmap-content
			width 100%
			height 800px
			border 1px solid $border 
			overflow hidden
		.anchorBL
			display none
</style>